{extend name="_public/table_page" /}

{block name="button"}
<div class="weadmin-block" style="overflow: hidden">
    {if auth("$classuri/del")}
    <button class="layui-btn layui-btn-xs" data-post-batch='{:url("$classuri/del")}' data-title="批量删除">批量删除</button>
    {/if}
    {if auth("$classuri/add")}
    <button class="layui-btn layui-btn-xs" data-modal='{:url("$classuri/add")}' data-title="添加角色">添加歌曲</button>
    {/if}
</div>
{/block}

{block name="table"}
<table class="layui-table" lay-even lay-skin="line" lay-size="sm">
    <thead>
    <tr>
        <th>
            <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
        </th>
        <th>id</th>
        <th>歌曲</th>
        <th>歌手</th>
        <th>图片</th>
        <th>试听</th>
        <th>操作</th>
    </thead>
    <tbody>
    {volist name="list" id="vo"}
    <tr>
        <td>
            <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo.id}'><i class="layui-icon">&#xe605;</i></div>
        </td>
        <td>{$vo.id}</td>
        <td>{$vo.title}</td>
        <td>{$vo.author}</td>
        <td><img src="{$vo.pic}" class="data-tips-image" alt=""></td>
        <td><a href="{$vo.url}" target="_blank">试听</a></td>
        <td>
            {if auth("$classuri/del")}
            <button class="layui-btn layui-btn-xs" href="javascript:;"
                    data-confirm="确定要删除吗！" data-post='{:url("$classuri/del")}' data-param='ids={$vo.id}'>
                删除
            </button>
            {/if}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{$page|raw}
{/block}
